<?php
defined ( 'IN_ADMIN' ) or exit ( 'No permission resources.' );
$show_dialog = 1;
include $this->admin_tpl ( 'header', 'admin' );
?>
<form method="post" name="frmlist" action="">
	<div class="table-list">
		<table width="100%" cellspacing="0">
			<thead>
				<tr>
					<th align="left" colspan="6">
						区域管理 | 
						<a href="/index.php?m=hchbase&c=area&a=myadd">
							<em>新增区域</em>
						</a>
					</th>
				</tr>
				<tr>
					<th width="30" align="center">&nbsp; </th>
					<th align="center">名称</th>
					<th align="center">上一级</th>
					<th align="center">管理操作</th>
				</tr>
			</thead>
			<?php
			if (is_array ( $lists ) && count ( $lists ) > 0) {
				foreach ($lists as $item){
			?>
          	<tr>
				<td align="center" width="35"><input type="checkbox" name="id[]"
					value="<?php echo $item['linkageid']?>"></td>
				<td align="center" width="10%"><?php echo $item['name']?></a></td>
				<td align="center"><?php echo $listsKV[$item['parentid']];?></td>
				<td align="center" width="10%"><a
					href='/index.php?m=hchbase&c=area&a=myedit&id=<?php echo $item['linkageid'] ?>'>编辑</a>
					| <a
					href="/index.php?m=hchbase&c=area&a=mydelone&id=<?php echo $item['linkageid'] ?>"
					onclick="return confirm('确认删除记录吗？')">删除</a></td>
			</tr>
			<?php
				}	
			}else{
			?>
			<tr>
				<td align="center"colspan="5">没有查询到数据。</td>
			</tr>
			<?php }?>
			<tr>
				<td colspan="10"><input type="submit" class="button"
					name="submitdel" onClick="doDel()" value="删除" /></td>
			</tr>
			</tbody>
		</table>
	</div>
	<div id="pages"><?php echo $pages ?></div>
</form>
</body>
<script type="text/javascript">
function doDel(){
	if(confirm('确认删除记录吗？')){
		document.frmlist.action='/index.php?m=hchbase&c=area&a=mydel';
		submitchk.submit();
	}
}
</script>
</html>